package com.itheima.edu.info.student.manager.controller;

import com.itheima.edu.info.student.manager.domain.Student;
import com.itheima.edu.info.student.util.AgeUtil;

//客服类:面向客户,输出功能,收集客户需求
public class StudentController extends BaseStudentController{
    //封装对象的方法
    public Student inputStudentInfo(String id) {
        System.out.println("请输入学生姓名");
        String name = sc.next();

        System.out.println("请输入学生出生日期");
        String birthday = sc.next();

        String age = AgeUtil.getAge(birthday);

        Student stu = new Student();
        //将接收到的学生信息封装成学生对象
        stu.setId(id);
        stu.setName(name);
        stu.setAge(age);
        stu.setBirthday(birthday);
        return stu;

    }

}



